﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>系统日志</title>
</head>
<body>
    <div>
        <div style="padding-top: 0px;">
            <div id="sys_log" style="display:none" >
                <el-form ref="form"
                         size="mini"
                         :model="form">
                    
                    <el-form-item>
                        日志类型：
                        <el-select style="width:100px;" v-model="form.logType" placeholder="请选择">
                            <el-option label="All"
                                       value="-1">
                            </el-option>
                            <el-option label="Info"
                                       value="0">
                            </el-option>
                            <el-option label="Warn"
                                       value="1">
                            </el-option>
                            <el-option label="Error"
                                       value="2">
                            </el-option>
                            <el-option label="Fatal"
                                       value="3">
                            </el-option>
                        </el-select>
                        标题/内容/追踪：
                        <el-input style="width:20%;"
                                  prefix-icon="el-icon-search"
                                  placeholder="标题/内容/追踪标识"
                                  v-model="form.title"></el-input>
                        <el-button type="primary" v-on:keyup.enter="onQuery"  @click="onQuery">查询</el-button>
                    </el-form-item>
                </el-form>
                <el-table :data="mData"
                          border
                          stripe
                          size="mini"
                          :max-height="window.innerHeight-98"
                          style="width: 100%;">
                    <el-table-column type="index"
                                     fixed
                                     :index="indexMethod">
                    </el-table-column>
                    <el-table-column fixed prop="Title"
                                     show-overflow-tooltip
                                     label="标题"
                                     width="120">
                    </el-table-column>
                    <el-table-column fixed prop="LogType"
                    show-overflow-tooltip
                                     label="日志类型"
                                     width="80">
                        <template slot-scope="scope">
                            <el-tag :type="scope.row.LogType=='0'?'info':(scope.row.LogType=='1'?'warning':(scope.row.LogType=='2'?'danger':''))">{{scope.row.LogType=="0"?"Info":(scope.row.LogType=="1"?"Warn":(scope.row.LogType=="2"?"Error":"Fatal"))}}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column prop="AppName"
                    show-overflow-tooltip
                                     label="应用名称"
                                     width="120">
                    </el-table-column>
                    <el-table-column prop="Content"
                    show-overflow-tooltip
                                     label="日志内容">
                    </el-table-column>
                    <el-table-column prop="Uname"
                    show-overflow-tooltip
                                     label="用户名"
                                     width="100">
                    </el-table-column>
                    <el-table-column prop="timespan"
                    show-overflow-tooltip
                                     label="时间"
                                     width="180">
                    </el-table-column>
                    <el-table-column prop="TraceId"
                    show-overflow-tooltip
                                     label="链路标识"
                                     width="100">
                    </el-table-column>
                    <el-table-column fixed="right"
                                     align="center"
                                     width="120"
                                     label="操作">
                        <template slot-scope="scope">
                            <el-button @click="linkToTrack(scope.row)" type="text" size="small">链路</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="block" style="text-align:center">
                    <el-pagination @size-change="handleSizeChange"
                                   @current-change="handleCurrentChange"
                                   :current-page="currentPage"
                                   :page-sizes="pagesizes"
                                   :page-size="pagesize"
                                   layout="total, sizes, prev, pager, next, jumper"
                                   :total="total">
                    </el-pagination>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="../../js/jquery.min.js"></script>
<!-- 先引入 Vue -->
<script src="../../js/vue.min.js"></script>
<link href="../../css/element-ui-index.css" rel="stylesheet" />
<!-- 引入组件库 -->
<script src="../../js/element-ui-index.js"></script>
<!-- 生产环境版本，优化了尺寸和速度 -->
<!--<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>-->
<!-- 引入样式 -->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.14.0/lib/theme-chalk/index.css">-->
<link rel="stylesheet" href="../../css/common.css">
<!-- 引入组件库 -->
<!--<script src="https://cdn.jsdelivr.net/npm/element-ui@2.14.0/lib/index.js"></script>-->

<!--<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>-->
<script src="../../js/base.js"></script>
<script src="index.js"></script>
<style>
    .el-button {
        font-size: 10px;
    }
    .warning-row {
        background: oldlace;
    }

    .success-row {
        background: #f0f9eb;
    }
    body {
        height: 100%;
        -moz-osx-font-smoothing: grayscale;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;
    }
</style>
</html>